<template>
    <el-form ref="ruleFormRef" :model="formInline" :rules="formRules" label-width="auto" label-position="top"
      v-loading="isLoading">
        <div>请输入{{qujianzhi?.value2[0]+'-'+qujianzhi?.value2[1]}}内的参数</div>
          <el-form-item  prop="gatewayName">
            <el-input  v-model.trim="formInline.inputvalue" clearable
              :placeholder="'请输入'+qujianzhi?.value2[0]+'-'+qujianzhi?.value2[1]" />
          </el-form-item>
    </el-form>
  </template>
  
  <script setup lang="ts">
  import { ElMessage, ElMessageBox } from "element-plus";
  import { ref, reactive } from "vue";
  import ReCol from "@/components/ReCol";
  import type { FormRules } from "element-plus";
  type FormProps = {
    formInline: infoType;
    isLoading: boolean;
    flowCardNum: any;
    qujianzhi: any;
  };
  const props = withDefaults(defineProps<FormProps>(), {
    formInline: () => ({}) as infoType,
    isLoading: false,
    flowCardNum: null,
    qujianzhi: null
  });
  const ruleFormRef = ref();
  const formRules = reactive(<FormRules>{
    gatewayType:[{ required: true, message: prompt?.status, trigger: "blur" }],
    rate: [
      { required: true, message: prompt?.rate, trigger: "blur" },
      { pattern: /^[1-9][0-9]*$/, trigger: "changblure", message: "只能输入正整数" }
    ],
    flowCardNum: [{ pattern: /^[0-9a-zA-Z]+$/, trigger: "change", message: "只能输入数字和字母" }, { pattern: /^[A-Za-z0-9]{10,16}$/, trigger: "change", message: "流量卡号应为10-16位" }]
  });
  function getRef() {
    return ruleFormRef.value;
  }
  defineExpose({ getRef });
  </script>
  